package homework;

class CPU {
    private int speed;

    public int getSpeed() {
        return speed;
    }

    public void setSpeed(int m) {
        this.speed = m;
    }
}

// HardDisk.java
class HardDisk {
    private int amount;

    public int getAmount() {
        return amount;
    }

    public void setAmount(int m) {
        this.amount = m;
    }
}

// PC.java
class PC {
    private CPU cpu;
    private HardDisk HD;

    public void setCUPCPU(CPU c) {
        this.cpu = c;
    }

    public void setHardDisk(HardDisk h) {
        this.HD = h;
    }

    public void shou() {
        System.out.println("CPU Speed: " + cpu.getSpeed() + " MHz");
        System.out.println("Hard Disk Amount: " + HD.getAmount() + " GB");
    }
}

// Test.java
public class homework_third {
    public static void main(String[] args) {
        CPU cpu = new CPU();
        cpu.setSpeed(2200);

        HardDisk disk = new HardDisk();
        disk.setAmount(200);

        PC pc = new PC();
        pc.setCUPCPU(cpu);
        pc.setHardDisk(disk);
        pc.shou();
    }
}